var a = require("../../@babel/runtime/helpers/interopRequireDefault"), e = a(require("../../utils/util")), t = a(require("../../utils/logs")), o = getApp();
Page({

    /**
     * 页面的初始数据
     */
    data: {
        items: [],
        money: '',
        countPage: '',
        page: 1,
        pool:''
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
        this.getData()
    },
    getData() {
        var e = this, t = o.getNetAddresss("Feilong.user_list");
        o._getNetWork({
            url: t,
            data: {
                uid: wx.getStorageSync("yz_uid"),
                page: e.data.page,
            },
            success: function (a) {
                e.setData({
                    // items: a.data.data.list.data,
                    money: a.data.data.money,
                    pool:a.data.data.pool
                })
                if (a.statusCode == 200 && a.data.result == 1) {
                    e.setData({
                        countPage: a.data.data.list.last_page,
                    })
                    if (e.data.page == 1) {
                        var dataList = a.data.data.list.data
                    } else {
                        var dataList = e.data.items
                        dataList = dataList.concat(a.data.data.list.data)
                    }
                    e.setData({
                        items: dataList,
                    })
                    console.log('09090', dataList)
                }
                console.log(a, '小飞龙')
            }
        });
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {

    },

    onPullDownRefresh() {
        this.data.page = 1;
        this.getData()
    },
    onReachBottom() {
        console.log('到达底部')
        if (this.data.countPage > this.data.page) {
            this.data.page++;
            this.getData()
        } else {
            if (this.data.page != 1) {
                wx.showToast({
                    title: '已加载全部',
                    icon: 'none'
                })
            }
        }
    },


/**
 * 用户点击右上角分享
 */
onShareAppMessage() {

}
})